{{ content() }}
<div id="dialog" title="Basic dialog" style="display: none;">
</div>
<section id="main">
    <div class="alldoc_title">
        <h2>
            Tài liệu	<a href="{{url('admin/add_doc')}}" class="add-new-h2">Add New</a>
        </h2>
    </div>  
    <div class="" style="margin: 20px auto; width: 1050px">
        {{form('id':'adminForm')}}
        <div>
            <select name="action" id="action">
                <option value="-1" selected="selected">Tác vụ</option>
                <option value="add">Thêm</option>
                <option value="edit" class="hide-if-no-js">Chỉnh sửa</option>
                <option value="trash">Xóa</option>
            </select>
            <span class="button action"><a name="" id="actionbtn" style="color:#666">Áp dụng</a></span>  
            {{form.render('doctype')}}
            {{form.render('topic')}}
            <button class="button">Lọc</button>
            <div class="search">
                {{form.render('text')}} 
                <button class="button">Search tài liệu</button>
            </div>
        </div>
        <div class="fright_pagination">
            {{form.render('page')}}
            {{form.render('limit',['onchange':'adminForm.submit()'])}}
            {{form.render('orderby')}}
            {{elements.paginator(docs,'adminForm')}}
        </div>
        {{endform()}}
    </div>    

    <article class="manage_doc module">
        <header>
            <h3 class="tabs_involved">Quản lý tài liệu </h3>                       
        </header>

        <div class="tab_container">
            <div class="tab_content">
                <table class="tablesorter alldoc_table" cellspacing="0"> 
                    <thead> 
                        <tr> 
                            <th></th> 
                            <th class="column1">Image</th>                                 
                            <th class="column2">Title</th> 
                            <th class="column3">Composer</th>
                            <th class="column4">Cost</th>                                 
                            <th class="column5">Type </th> 
                            <th class="column6">Topic</th>
                            <th class="column7">Date</th>
                            <th class="column8">Link</th>
                            <th class="column9">Down</th>
                            <th class="column10">Public</th>
                            <th class="column11">Action </th>
                        </tr>                       
                    </thead> 
                    <tbody>
                        {% for doc in docs.items %}
                        <tr> 
                            <td><input class="item" type="checkbox"  data-id="{{doc.id}}" name="checkbox[]"></td>
                            <td class="doc_img"><img src="{{url('public/review/'~doc.topic_id~'/'~doc.id~'/'~doc.image)}}"></td>     
                            <td class="doc_title"><span>{{doc.title}}</span></td>  
                            <td><span>{{doc.UploadUser}}</span></td>
                            <td ><span>{{doc.cost}}</span></td> 
                            <td>{{doc.TypeName}}</td>
                            <td>{{doc.TopicName}}</td>
                            <td>{{doc.submit_date}}</td>
                            <td><div><span style="font-weight: bold; color:red"><a href="{{url('doc/view/'~doc.id)}}" target="_blank">.....</a></span></div></td>
                            <td>{{doc.download}}</td>
                            <td><p class="public public_{{doc.public}}"></p></td>
                            <td ><span><a href="{{url('admin/edit_doc/'~doc.id)}}"><img src="{{url('css/admin/images/icn_edit.png')}}" title="Edit"></a>&nbsp;&nbsp;<a id="delete" class="deletebtn" data-id="{{doc.id}}"><img src="{{url('css/admin/images/icn_trash.png')}}" title="Xóa"></a></span></td> 
                        </tr> 
                        {% endfor %}
                    </tbody> 
                </table>
            </div><!-- end of #tab1 -->
        </div><!-- end of .tab_container -->
    </article><!-- end of content manager article --> 
</section>
{{javascript_include('js/admin/docs.js')}}


